package com.cskaoyan.javase.basic._8loop;

import java.util.Scanner;

/**
 * 死循环
 * @since 11:31
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo2 {
    public static void main(String[] args) {
        // for (;;){}
        // while (true){}
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("请输入一个int整数:");
            int num = sc.nextInt();
            if (num > 0) {
                System.out.println("这是一个大于0的数!");
            } else if (num < 0) {
                System.out.println("这是一个小于0的数!");
            } else {
                System.out.println("是0");
            }
        }
    }
}
